
<link href="../css/Quantricss.css" rel="stylesheet" type="text/css">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<?php
  	
	
    require_once ("../mysql.php");
    require_once ("function_quantri.php");
    

    $list_chungloai = ChungLoai();
	$idLoai = $_GET['idLoai'];
	$loai = LoaiSP($idLoai);
    $rows_loai = mysql_fetch_array($loai);
?>
<form id="form1" name="form1" method="post" action="Sanpham_loai_update_check.php" enctype="multipart/form-data"> 
    <table width="550" border="1" align="center">
        <tr>
            <th height="39" colspan="2" align="center" bgcolor="#0000FF" scope="col">
        <span class="style1">Loại sản phẩm </span>        </tr>    
		<tr>
			<td  align="center">idLoai</td>
			<td><input id="idLoai" name="idLoai" value="<?php echo $_GET['idLoai']?>"></td>
		</tr>
        <tr>
			<td width="148" height="36" align="center">Tên loại</td>
            <td width="386" align="left"><label>
            <input type="text" name="TenLoai" id="TenLoai" value="<?php echo $rows_loai['TenLoai']?>"/>
            </label></td>
         </tr>   
         <tr>
		 	
             <td width ="148" height="36" align="center">Tên chủng loại</td>
             <td align="left">
                 <label>
                     <select name="chungloai" id="chungloai">
                         <option value="0">Chọn chủng loại</option>
                     
                             <?php while($row_chungloai_loai=  mysql_fetch_array($list_chungloai)){
                                    $sel = "";
                                    if($row_chungloai_loai['idCL']==$rows_loai['idCL'])
                                        $sel = "selected='selected'";
                                 ?>
                                 <option value="<?php echo $row_chungloai_loai['idCL'];?>" <?php echo $sel;?>>
                                     <?php echo $row_chungloai_loai['TenCL']?>                                  </option>
                              <?php }?>
                         </option>
                     </select>
                 </label>             </td>
         </tr>    
          <tr>
            <td width="148" height="36" align="center">Thứ tự</td>
            <td width="386" align="left">
                <label>
                    <input type="text" name="ThuTu" id="ThuTu" value="<?php echo $rows_loai['ThuTu']?>"/>
               </label></td>
         </tr>   
         <tr>
             <td colspan="2" align ="center">
                 <label>
                     <input type="submit" name="btnUpdate" id="btnUpdate" value="Update"/>
                 </label>              </td>   
         </tr>    
    </table>
</form>
